import {_decorator, Component, Prefab, instantiate} from 'cc';

const {ccclass, property} = _decorator;

@ccclass('Side')
export class Side extends Component {

    @property(Prefab)
    sidePrefab: Prefab = null

    click() {
        let side = instantiate(this.sidePrefab);
        side.parent = this.node;
        side.active = true;
    }
}


